{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { isMemo } from 'react-is';\nimport useMemo from './hooks/useMemo';\nexport function fillRef(ref, node) {\n  if (typeof ref === 'function') {\n    ref(node);\n  } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n    ref.current = node;\n  }\n}\n/**\n * Merge refs into one ref function to support ref passing.\n */\nexport function composeRef() {\n  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n    refs[_key] = arguments[_key];\n  }\n  var refList = refs.filter(function (ref) {\n    return ref;\n  });\n  if (refList.length <= 1) {\n    return refList[0];\n  }\n  return function (node) {\n    refs.forEach(function (ref) {\n      fillRef(ref, node);\n    });\n  };\n}\nexport function useComposeRef() {\n  for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    refs[_key2] = arguments[_key2];\n  }\n  return useMemo(function () {\n    return composeRef.apply(void 0, refs);\n  }, refs, function (prev, next) {\n    return prev.length === next.length && prev.every(function (ref, i) {\n      return ref === next[i];\n    });\n  });\n}\nexport function supportRef(nodeOrComponent) {\n  var _type$prototype, _nodeOrComponent$prot;\n  var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n  // Function component node\n  if (typeof type === 'function' && !((_type$prototype = type.prototype) === null || _type$prototype === void 0 ? void 0 : _type$prototype.render)) {\n    return false;\n  }\n  // Class component\n  if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) === null || _nodeOrComponent$prot === void 0 ? void 0 : _nodeOrComponent$prot.render)) {\n    return false;\n  }\n  return true;\n}\n/* eslint-enable */","map":{"version":3,"names":["_typeof","isMemo","useMemo","fillRef","ref","node","current","composeRef","_len","arguments","length","refs","Array","_key","refList","filter","forEach","useComposeRef","_len2","_key2","apply","prev","next","every","i","supportRef","nodeOrComponent","_type$prototype","_nodeOrComponent$prot","type","prototype","render"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-util/es/ref.js"],"sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { isMemo } from 'react-is';\nimport useMemo from './hooks/useMemo';\nexport function fillRef(ref, node) {\n  if (typeof ref === 'function') {\n    ref(node);\n  } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n    ref.current = node;\n  }\n}\n/**\n * Merge refs into one ref function to support ref passing.\n */\nexport function composeRef() {\n  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n    refs[_key] = arguments[_key];\n  }\n  var refList = refs.filter(function (ref) {\n    return ref;\n  });\n  if (refList.length <= 1) {\n    return refList[0];\n  }\n  return function (node) {\n    refs.forEach(function (ref) {\n      fillRef(ref, node);\n    });\n  };\n}\nexport function useComposeRef() {\n  for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    refs[_key2] = arguments[_key2];\n  }\n  return useMemo(function () {\n    return composeRef.apply(void 0, refs);\n  }, refs, function (prev, next) {\n    return prev.length === next.length && prev.every(function (ref, i) {\n      return ref === next[i];\n    });\n  });\n}\nexport function supportRef(nodeOrComponent) {\n  var _type$prototype, _nodeOrComponent$prot;\n  var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n  // Function component node\n  if (typeof type === 'function' && !((_type$prototype = type.prototype) === null || _type$prototype === void 0 ? void 0 : _type$prototype.render)) {\n    return false;\n  }\n  // Class component\n  if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) === null || _nodeOrComponent$prot === void 0 ? void 0 : _nodeOrComponent$prot.render)) {\n    return false;\n  }\n  return true;\n}\n/* eslint-enable */"],"mappings":"AAAA,OAAOA,OAAO,MAAM,mCAAmC;AACvD,SAASC,MAAM,QAAQ,UAAU;AACjC,OAAOC,OAAO,MAAM,iBAAiB;AACrC,OAAO,SAASC,OAAO,CAACC,GAAG,EAAEC,IAAI,EAAE;EACjC,IAAI,O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